import { View, Text, StyleSheet, Button } from "react-native";

export default function Home({ navigation }) {
  const go2Detail = () => {
    navigation.navigate("Detail",{
        name:"详情页面标题"
    });
  };

  return (
    <View style={styles.container}>
      <Text>首页</Text>
      <Button title="详情页面" onPress={go2Detail} />
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    alignItems: "center",
    justifyContent: "center",
  },
});
